package topevery.syn.data.model;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import topevery.syn.data.model.codec.ModelTypeEnumCodec;

import java.time.LocalDateTime;

@Data
public class WasteTransferData implements IGlbModel {

    @JSONField(name = "a")
    public Long gid;

    @JSONField(name = "b", serializeUsing = ModelTypeEnumCodec.class, deserializeUsing = ModelTypeEnumCodec.class)
    public ModelTypeEnum modelType = ModelTypeEnum.WasteTransfer;

    @JSONField(name = "c")
    public String clientKey;

    //氨气
    @JSONField(name = "d")
    public Double a21001_Rtd;
    //氨气传感器
    @JSONField(name = "e")
    public String a21001_Flag;

    //硫化氢
    @JSONField(name = "f")
    public Double a21028_Rtd;
    @JSONField(name = "g")
    public String a21028_Flag;

    //温度
    @JSONField(name = "h")
    public Double a01001_Rtd;
    @JSONField(name = "i")
    public String a01001_Flag;

    //湿度
    @JSONField(name = "j")
    public Double a01002_Rtd;
    @JSONField(name = "k")
    public String a01002_Flag;


    //光照
    public Double a04003_Rtd;
    @JSONField(name = "l")
    public String a04003_Flag;

    //PM2.5
    @JSONField(name = "m")
    public Double a34004_Rtd;
    @JSONField(name = "n")
    public String a34004_Flag;


    @JSONField(name = "o")
    public LocalDateTime dbCreateDate;

    @JSONField(name = "p")
    public LocalDateTime clientDate;

    @JSONField(name = "q")
    public String modelJson;

    // 放大因子
    @JSONField(name = "r")
    public Double scale;

    // 浓度
    @JSONField(name = "s")
    public Double conc;

    //PM10
    @JSONField(name = "t")
    public Double pm10 ;

    /// <summary>
    /// 垃圾桶满溢状态：0--空 10---里面有东西 11----满
    /// </summary>
    @JSONField(name = "u")
    public Integer overflowState;

    @Override
    public String getGlbModelKey() {
        return clientKey;
    }

    @Override
    public Long getGid() {
        return gid;
    }

    @Override
    public void setGid(Long gid) {
        this.gid = gid;
    }

    @Override
    public ModelTypeEnum getModelType() {
        return modelType;
    }

    @Override
    public void setModelType(ModelTypeEnum modelType) {
        this.modelType = modelType;
    }
}